﻿using System.ComponentModel.DataAnnotations;

namespace Spotted.WebApi.Models
{
    public class CreateUserViewModel
    {
        [Required(AllowEmptyStrings = false, ErrorMessage = "Email Address is required")]
        [RegularExpression(@"^[A-Za-z0-9]+@[A-Za-z0-9]{2,}\.[A-Za-z0-9]{2,}$", ErrorMessage = "Invalid format for the email address")]
        public string EmailAddress { get; set; }

        [Required(AllowEmptyStrings = false, ErrorMessage = "Password is required")]
        [StringLength(100, MinimumLength = 5, ErrorMessage = "Password length must be at least 5 characters")]
        public string Password { get; set; }

        [Required(AllowEmptyStrings = false, ErrorMessage = "First Name is required")]
        public string FirstName { get; set; }

        [Required(AllowEmptyStrings = false, ErrorMessage = "Last Name is required")]
        public string LastName { get; set; }
    }
}